package vtt.android.lichphatsongbongda.entities;

import java.util.Random;

import vtt.android.lichphatsongbongda.Constants;
import vtt.android.lichphatsongbongda.R;
import android.content.Context;
import android.util.SparseArray;

public class CommonHashMap {

    
    public static int[] mTabColors = {
        R.color.blue_dark,  
        R.color.red_dark, 
        R.color.green_dark,  
        R.color.orange_dark,  
        R.color.purple_dark
    }; 
    
	/** background hashmap */
    public static int[] backgrounds =  {
		R.drawable.background_main_1,
		R.drawable.background_main_2,
		R.drawable.bg_zoro_1,
		R.drawable.bg_xi_yan_sexy_1,
		R.drawable.bg_zoro_2,
		R.drawable.bg_xi_yan_sexy_3,
		R.drawable.bg_zoro_1,
		R.drawable.bg_elly_tran_7,
		R.drawable.bg_elly_tran_8,
		R.drawable.bg_zoro_2,
		R.drawable.bg_elly_tran_9
	};
	
	/** get random background id */
	public static int getRandomBackgroundId() {
		Random random = new Random();
		int index = random.nextInt(backgrounds.length);
		return backgrounds[index];
	}
	
	/** get random background id */
    public static int getRandomColorId(Context context) {
        Random random = new Random();
        int index = random.nextInt(mTabColors.length);
        return mTabColors[index];
    }

	/**
	 * get page mapping title, icon and fragment
	 * @return
	 */
	public static SparseArray<PageInfo> getPageMap(Context context) {
		SparseArray<PageInfo> pageMap = new SparseArray<PageInfo>();
		pageMap.put(Constants.PAGE_KENH_TV, new PageInfo(context.getString(R.string.title_lichphatsong), R.drawable.icon_tv_32));
		pageMap.put(Constants.PAGE_TIN_NONG, new PageInfo(context.getString(R.string.title_tinthethao), R.drawable.icon_rss_32));
		pageMap.put(Constants.PAGE_LIVESCORE, new PageInfo(context.getString(R.string.title_livescore), R.drawable.icon_info_32));
		pageMap.put(Constants.PAGE_KEO_DA_BANH, new PageInfo(context.getString(R.string.title_keodabanh), R.drawable.icon_fish_32));
		pageMap.put(Constants.PAGE_SOPCAST, new PageInfo(context.getString(R.string.title_sopcast), R.drawable.ic_sopcast_32));
		return pageMap;
	}

}
